const state = {
  pos: null // 位置信息
}

const getters = {
  pos: state => state.pos
}

const actions = {
  fetchPos: ({ commit, state }, text) => {
    commit('updatePosState', text)
  }
}

const mutations = {
  updatePosState: (state, payload) => {
    state.pos = payload
  }
}

export default {
  state,
  getters,
  actions,
  mutations
}
